import {WidgetClass} from "./widget";

export class WidgetIconButton extends WidgetClass {
  constructor(options = {}) {
    super(options);
    const {ports,UI} = options
    if (UI) {
      this.UI.data = UI.data;
    }
    if (ports) {
      this.ports = ports;
    } else {
      this.ports = this.assembleDefaultPorts();
    }
  }

  assembleDefaultState(options = {}) {
    const superState = super.assembleDefaultState(options);
    return {
      ...superState,
      // values: {
      //   icon: "e740",
      // },
    };
  }
  assembleDefaultPorts() {
    const superState = super.assembleDefaultPorts();
    return {
      ...superState,
      events: [
        ...superState.events
      ],
    };
  }
}
